Optimal. Leaf size=152 \[ -\frac {1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {i b d^2 \tan ^{-1}(c x)}{2 c^3}+\frac {i b d^2 x}{2 c^2}+\frac {4 b d^2 \log \left (c^2 x^2+1\right )}{15 c^3}+\frac {1}{20} b c d^2 x^4-\frac {4 b d^2 x^2}{15 c}-\frac {1}{6} i b d^2 x^3 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 152, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {43, 4872, 12, 1802, 635, 203, 260} \[ -\frac {1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {4 b d^2 \log \left (c^2 x^2+1\right )}{15 c^3}+\frac {i b d^2 x}{2 c^2}-\frac {i b d^2 \tan ^{-1}(c x)}{2 c^3}+\frac {1}{20} b c d^2 x^4-\frac {4 b d^2 x^2}{15 c}-\frac {1}{6} i b d^2 x^3 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 203
Rule 260
Rule 635
Rule 1802
Rule 4872
Rubi steps
\begin {align*} \int x^2 (d+i c d x)^2 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )-(b c) \int \frac {d^2 x^3 \left (10+15 i c x-6 c^2 x^2\right )}{30 \left (1+c^2 x^2\right )} \, dx\\ &=\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{30} \left (b c d^2\right ) \int \frac {x^3 \left (10+15 i c x-6 c^2 x^2\right )}{1+c^2 x^2} \, dx\\ &=\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{30} \left (b c d^2\right ) \int \left (-\frac {15 i}{c^3}+\frac {16 x}{c^2}+\frac {15 i x^2}{c}-6 x^3+\frac {15 i-16 c x}{c^3 \left (1+c^2 x^2\right )}\right ) \, dx\\ &=\frac {i b d^2 x}{2 c^2}-\frac {4 b d^2 x^2}{15 c}-\frac {1}{6} i b d^2 x^3+\frac {1}{20} b c d^2 x^4+\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )-\frac {\left (b d^2\right ) \int \frac {15 i-16 c x}{1+c^2 x^2} \, dx}{30 c^2}\\ &=\frac {i b d^2 x}{2 c^2}-\frac {4 b d^2 x^2}{15 c}-\frac {1}{6} i b d^2 x^3+\frac {1}{20} b c d^2 x^4+\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )-\frac {\left (i b d^2\right ) \int \frac {1}{1+c^2 x^2} \, dx}{2 c^2}+\frac {\left (8 b d^2\right ) \int \frac {x}{1+c^2 x^2} \, dx}{15 c}\\ &=\frac {i b d^2 x}{2 c^2}-\frac {4 b d^2 x^2}{15 c}-\frac {1}{6} i b d^2 x^3+\frac {1}{20} b c d^2 x^4-\frac {i b d^2 \tan ^{-1}(c x)}{2 c^3}+\frac {1}{3} d^2 x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{2} i c d^2 x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{5} c^2 d^2 x^5 \left (a+b \tan ^{-1}(c x)\right )+\frac {4 b d^2 \log \left (1+c^2 x^2\right )}{15 c^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 116, normalized size = 0.76 \[ \frac {d^2 \left (2 a c^3 x^3 \left (-6 c^2 x^2+15 i c x+10\right )+16 b \log \left (c^2 x^2+1\right )+b c x \left (3 c^3 x^3-10 i c^2 x^2-16 c x+30 i\right )+2 b \left (-6 c^5 x^5+15 i c^4 x^4+10 c^3 x^3-15 i\right ) \tan ^{-1}(c x)\right )}{60 c^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 160, normalized size = 1.05 \[ -\frac {12 \, a c^{5} d^{2} x^{5} - {\left (30 i \, a + 3 \, b\right )} c^{4} d^{2} x^{4} - 10 \, {\left (2 \, a - i \, b\right )} c^{3} d^{2} x^{3} + 16 \, b c^{2} d^{2} x^{2} - 30 i \, b c d^{2} x - 31 \, b d^{2} \log \left (\frac {c x + i}{c}\right ) - b d^{2} \log \left (\frac {c x - i}{c}\right ) - {\left (-6 i \, b c^{5} d^{2} x^{5} - 15 \, b c^{4} d^{2} x^{4} + 10 i \, b c^{3} d^{2} x^{3}\right )} \log \left (-\frac {c x + i}{c x - i}\right )}{60 \, c^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 154, normalized size = 1.01 \[ -\frac {c^{2} d^{2} a \,x^{5}}{5}+\frac {i c \,d^{2} a \,x^{4}}{2}+\frac {d^{2} a \,x^{3}}{3}-\frac {c^{2} d^{2} b \arctan \left (c x \right ) x^{5}}{5}+\frac {i c \,d^{2} b \arctan \left (c x \right ) x^{4}}{2}+\frac {d^{2} b \arctan \left (c x \right ) x^{3}}{3}+\frac {i b \,d^{2} x}{2 c^{2}}+\frac {b c \,d^{2} x^{4}}{20}-\frac {i b \,d^{2} x^{3}}{6}-\frac {4 b \,d^{2} x^{2}}{15 c}+\frac {4 b \,d^{2} \ln \left (c^{2} x^{2}+1\right )}{15 c^{3}}-\frac {i b \,d^{2} \arctan \left (c x \right )}{2 c^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 174, normalized size = 1.14 \[ -\frac {1}{5} \, a c^{2} d^{2} x^{5} + \frac {1}{2} i \, a c d^{2} x^{4} - \frac {1}{20} \, {\left (4 \, x^{5} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{4} - 2 \, x^{2}}{c^{4}} + \frac {2 \, \log \left (c^{2} x^{2} + 1\right )}{c^{6}}\right )}\right )} b c^{2} d^{2} + \frac {1}{3} \, a d^{2} x^{3} + \frac {1}{6} i \, {\left (3 \, x^{4} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{3} - 3 \, x}{c^{4}} + \frac {3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b c d^{2} + \frac {1}{6} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d^{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.74, size = 140, normalized size = 0.92 \[ -\frac {\frac {d^2\,\left (-16\,b\,\ln \left (c^2\,x^2+1\right )+b\,\mathrm {atan}\left (c\,x\right )\,30{}\mathrm {i}\right )}{60}+\frac {4\,b\,c^2\,d^2\,x^2}{15}-\frac {b\,c\,d^2\,x\,1{}\mathrm {i}}{2}}{c^3}+\frac {d^2\,\left (20\,a\,x^3+20\,b\,x^3\,\mathrm {atan}\left (c\,x\right )-b\,x^3\,10{}\mathrm {i}\right )}{60}-\frac {c^2\,d^2\,\left (12\,a\,x^5+12\,b\,x^5\,\mathrm {atan}\left (c\,x\right )\right )}{60}+\frac {c\,d^2\,\left (a\,x^4\,30{}\mathrm {i}+3\,b\,x^4+b\,x^4\,\mathrm {atan}\left (c\,x\right )\,30{}\mathrm {i}\right )}{60} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 4.13, size = 250, normalized size = 1.64 \[ - \frac {a c^{2} d^{2} x^{5}}{5} - \frac {4 b d^{2} x^{2}}{15 c} + \frac {i b d^{2} x}{2 c^{2}} - \frac {b d^{2} \left (- \frac {\log {\left (47 b c d^{2} x - 47 i b d^{2} \right )}}{60} - \frac {49 \log {\left (47 b c d^{2} x + 47 i b d^{2} \right )}}{120}\right )}{c^{3}} - x^{4} \left (- \frac {i a c d^{2}}{2} - \frac {b c d^{2}}{20}\right ) - x^{3} \left (- \frac {a d^{2}}{3} + \frac {i b d^{2}}{6}\right ) + \left (\frac {i b c^{2} d^{2} x^{5}}{10} + \frac {b c d^{2} x^{4}}{4} - \frac {i b d^{2} x^{3}}{6}\right ) \log {\left (i c x + 1 \right )} - \frac {\left (12 i b c^{5} d^{2} x^{5} + 30 b c^{4} d^{2} x^{4} - 20 i b c^{3} d^{2} x^{3} - 13 b d^{2}\right ) \log {\left (- i c x + 1 \right )}}{120 c^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________